Doku/Bild/Text zu Bild
Nano Banana Pro· Text zu Bild
Text zu Bild
POST
https://api.foxwire.ai/v1/media/generationsPricing Model
1K 7,65 ₽ · 2K 7,65 ₽ · 4K 10,2 ₽ per image. Billed only on success.
Execution Flow
Asynchronous submission model. Submitting requests queues background workers.
#Aufgabe einreichen
Die Medienerzeugung ist asynchron: Sie erhalten sofort eine Task-ID, ohne zu warten.
bash
curl https://api.foxwire.ai/v1/media/generations \
-H "Authorization: Bearer $CORRY_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "nano-banana-pro", "prompt": "a cute robot mascot, flat vector logo" }'
# → { "id": "cmus7q0x9000108l3f5g2abcd", "status": "queued" }#Anfrageparameter
| Parameter | Typ | Erforderlich | Standard | Beschreibung |
|---|---|---|---|---|
prompt | string | Ja | — | Text prompt describing the image to generate (max 20000 chars). |
image_input | string[] | Nein | — | Optional reference/source image URLs to transform (max 8, ≤30MB each; jpeg/png/webp). |
aspect_ratio | string | Nein | 1:1 | Aspect ratio of the output image. Optionen: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, auto |
resolution | string | Nein | 1K | Output resolution. Higher resolutions take longer to generate. Optionen: 1K, 2K, 4K |
output_format | string | Nein | png | Format of the output image. Optionen: png, jpg |
callback_url | string | Nein | — | Optional public http(s) URL. We POST the task result here the moment generation finishes (success or failure). |
#Poll for the result
Generation runs asynchronously — the submit call returns immediately with a task id. Poll this endpoint with that id every few seconds until status becomes succeeded (result ready) or a terminal error (failed / timeout).
GET
https://api.foxwire.ai/v1/media/generations/{id}bash
# take the id from the submit response, then poll every ~3s
curl https://api.foxwire.ai/v1/media/generations/cmus7q0x9000108l3f5g2abcd \
-H "Authorization: Bearer $CORRY_KEY"
# repeat until "status" is "succeeded" (or "failed" / "timeout")#Antwortbeispiel
Beim Einreichen
json
{
"id": "cmus7q0x9000108l3f5g2abcd",
"status": "queued",
"type": "image",
"model": "nano-banana-pro"
}Bei Erfolg (nach Abfrage)
json
{
"id": "cmus7q0x9000108l3f5g2abcd",
"status": "succeeded",
"type": "image",
"model": "nano-banana-pro",
"result": { "urls": ["https://cdn.sozdai.ai/image/1782537315223-b49c0c1b771f.png"] },
"cost": "0.0500",
"currency": "USD"
}Antwortfelder
| Feld | Typ | Beschreibung |
|---|---|---|
status | string | Aufgabenstatus: queued / submitted / succeeded / failed / timeout. |
type | string | Medientyp: image / video / music. |
model | string | Das von Ihnen angeforderte Modell. |
result | object | Bei Erfolg vorhanden. result.urls ist ein Array permanenter Datei-URLs. |
error | string | Fehlermeldung, vorhanden wenn die Aufgabe fehlgeschlagen ist. |
cost | string | Für diese Aufgabe berechneter Betrag — ein USD-String (z. B. "0.1200"). Siehe das currency-Feld. |
currency | string | Currency of cost — always "USD". |